#include <iostream>
#include <algorithm>
#include <cmath>

using namespace std;

const int N = 1010;
struct node{
	double l, r;

}a[N];
int n;
double d;

bool cmp(node& x, node& y)
{
	return x.l < y.l;
}

int main()
{
	int num = 0;
	while(cin >> n >> d, n && d)
	{
		num++;
		bool flag = false;
		for(int i = 1; i <= n; i++)
		{
			double x, y; cin >> x >> y;
			if(y > d) flag = true;
			double l = sqrt(d * d - y * y);
			a[i].l = x - l;
			a[i].r = x + l;
		}
		cout << "Case " << num << ": ";
		if(flag) cout << "-1" << endl;
		else
		{
			int ret = 1;
			sort(a + 1, a + 1 + n, cmp);
			double right = a[1].r;
			
			for(int i = 2; i <= n; i++)
			{
				double l = a[i].l, r = a[i].r;
				if(l > right)
				{
					ret++;
					right = r;
				}
				else
				{
					right = min(right, r);
				}
			}
			cout << ret << endl;
		}
		
	}
	
	return 0;
}
